<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>一号仓库管理系统</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        body {
            font-family: Arial, sans-serif;
        }
        .header {
            background-color: #2c5282;
            color: white;
            padding: 1rem;
            height: 60px;
        }
        .logo {
            font-size: 1.5rem;
            font-weight: bold;
        }
        .container {
            display: flex;
            height: calc(100vh - 60px);
        }
        .sidebar {
            width: 200px;
            background-color: #f8f9fa;
            border-right: 1px solid #dee2e6;
            padding: 1rem;
        }
        .menu-item {
            display: block;
            padding: 0.75rem 1rem;
            color: #333;
            text-decoration: none;
            border-radius: 4px;
            margin-bottom: 0.5rem;
            cursor: pointer;
        }
        .menu-item:hover {
            background-color: #e9ecef;
        }
        .menu-item.active {
            background-color: #2c5282;
            color: white;
        }
        .content {
            flex-grow: 1;
            padding: 1rem;
        }
        iframe {
            width: 100%;
            height: 100%;
            border: none;
        }
    </style>
</head>
<body>
    <header class="header">
        <div class="logo">一号仓库</div>
    </header>
    
    <div class="container">
        <nav class="sidebar">
            <a class="menu-item active" onclick="loadPage('dashboard/dashboard.html')">仪表盘</a>
            <a class="menu-item" onclick="loadPage('warehouse/warehouse.html')">仓库管理</a>
            <a class="menu-item" onclick="loadPage('product/product.html')">库存管理</a>
        </nav>
        
        <main class="content">
            <iframe id="contentFrame" src="dashboard/dashboard.html" frameborder="0"></iframe>
        </main>
    </div>

    <script>
        function loadPage(page) {
            document.getElementById('contentFrame').src = page;
            // 更新活动菜单项
            document.querySelectorAll('.menu-item').forEach(item => {
                if (item.getAttribute('onclick').includes(page)) {
                    item.classList.add('active');
                } else {
                    item.classList.remove('active');
                }
            });
        }
    </script>
</body>
</html>